<?php
class dashboard extends CI_Controller {

	function dashboard()
	{
		parent::__construct();
		$this->load->library('session');
		$this->load->library('form_validation');
		$this->load->library('encrypt');
		$this->load->model('mglobal');
        $this->load->model('mdashboard');
        $this->load->helper('url');
		$this->is_logged_in();
		#$this->mjadwal->saveLog();
	}

	function is_logged_in()
	{
		$is_logged_in = $this->session->userdata('is_logged_in');
		if(!isset($is_logged_in) || $is_logged_in != true)
		{
			redirect(base_url() .'index.php/login');
		}
	}

    function get_user_login($login){
        
        
  		$result = $this->mdashboard->get_user_login($login);

		echo json_encode($result);

    
    
    }
    
    function enc(){
    echo $this->encrypt->encode('NutechDb2012');
    echo '<br>';
    echo $this->encrypt->encode('postgres');
    }


	


}